<template>
    <div class="main">
        <van-nav-bar title="我的收藏" left-text="返回" left-arrow @click-left="onClickLeft"/>
        <!-- <ul>
            <li v-for="item in favoList" :key="item.id">
                <img :src="item.product.image[0]" alt="">
                <div>
                    <p>{{ item.product.title }}</p>
                    <span>￥{{ item.product.price }}</span>
                </div>
            </li>
        </ul> -->
        <img src="@/assets/nothing.png" alt="" style="width: 200px;height: 200px;">
    </div>
</template>
<script>
import {getfavorite} from "@/api/favorite"
export default {
   data() {
      return {
        favoList:[]
      }
   },
   created(){
        getfavorite().then(res=>{
            this.favoList = res.data.data;
        })
   },
   computed:{
   },
   methods:{
    onClickLeft(){
        this.$router.go(-1)
    }
   },
}
</script>
<style scoped>
    li{
        width: 95%;
        height: 100px;
        margin: auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 5px;
    }
    li img{
        width: 100px;
        height: 100px;
    }
    li p{
        width: 238px;
        font-size: 14px;
        margin-bottom: 10px;
    }
    li span{
        color: red;
    }
    .main{
        position: relative;
    }

    .main img{
        margin: 80px;
    }
</style>
